Platform Explorer / Nuxeo Platform LTS 2017 9.10

Component org.nuxeo.ecm.core.schema.ObjectResolverService

Documentation

This components allows to extend XSD field definition by providing a way to resolve simple type as external entity references.

Implementation

Class: org.nuxeo.ecm.core.schema.types.resolver.ObjectResolverServiceImpl

Services

Extension Points

XML Source

<?xml version="1.0"?>

<component name="org.nuxeo.ecm.core.schema.ObjectResolverService" version="1.0.0">
  <documentation>
    This components allows to extend XSD field definition by providing a way to resolve simple type as
    external entity references.
  </documentation>

  <service>
    <provide interface="org.nuxeo.ecm.core.schema.types.resolver.ObjectResolverService" />
  </service>

  <implementation class="org.nuxeo.ecm.core.schema.types.resolver.ObjectResolverServiceImpl" />

  <extension-point name="resolvers">

    <documentation>
      Extension Point to register an external entity resolver. You must provide an XSD type derived from xs:string and
      registered under namespace http://www.nuxeo.org/ecm/schemas/core/external-references/. The resolver class must
      implement org.nuxeo.ecm.core.schema.types.resolver.ObjectResolver.
      Example :
      <resolver type="productReference" class="org.mycompany.product.ProductNuxeoResolver" />

      By default, a constraint is added to documents about to be saved in order to validate if the property reference
      an existing external entity. You can disable this validation by setting attribute validation to false, for instance:
      <code xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:ref="http://www.nuxeo.org/ecm/schemas/core/external-references/">
        <xs:element name="lastContributor">
          <xs:simpleType>
            <xs:restriction base="xs:string" ref:resolver="userManagerResolver" ref:type="user" ref:validation="false" />
          </xs:simpleType>
        </xs:element>
      </code>
    </documentation>

    <object class="org.nuxeo.ecm.core.schema.types.resolver.ObjectResolverDescriptor" />

  </extension-point>

</component>